<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%--  <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> --%> 
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>首页</title>
<link rel="stylesheet" href="webjars/jquery-ui/1.12.1/jquery-ui.css">
<style type="text/css">
body {
	margin: 0;
	padding: 0;
}
.container {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
.top {
	height: 50px;
	background-color: #8B6969;
	flex-grow: 0;
	color: white;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.top>div>h3 {
	padding-left: 1em;
	display: inline-block;
	float: left;
}

.top>div>div {
	display: flex;
	flex-direction:column;
	justify-content:center;
	float: right;
	padding-right: 30px;
	
}
.top>div>div span {
	margin-top: 20px;
}
.center {
	background-color:red;
	flex-grow: 1;
	display: flex;
	flex-direction: row;
}

.bottom {
	height: 50px;
	background-color: #32CD32;
	flex-grow: 0;
	
}

.leftMenu {
	width: 200px;
	flex-flow: 0;
}
.workspace {
	flex-grow:1;
	background: white;
}

.ui-accordion .ui-accordion-content{
	padding: 1em 0.5em;
}
.ui-accordion .ui-accordion-content .ui-widget.ui-widget-content{
	border-width: 0;
}

.ui-accordion .ui-accordion-content .ui-menu .ui-menu-item{
	line-height: 2em;
}

#work {
	padding:0.5em 1em;
}
</style>
<script type="text/javascript" src="webjars/jquery/3.5.1/dist/jquery.js"></script>
<script type="text/javascript"src="webjars/jquery-ui/1.12.1/jquery-ui.js"></script>
<script type="text/javascript" src="static/custom.js"></script>
<script type="text/javascript">
	$(function(){
		$('#accordion').accordion({heightStyle:'fill'});
		$('.mainMenu').menu();
		$('.mainMenu li').click(function(){
			var self=$(this);
			var url=self.attr("src");
			$('#work').load(url);
		})
	})
</script>
</head>
<body>
<div id="dialog" style="display: none;"></div>
<div id="dialog2" style="display: none;"></div>
	<div class="container">
		<div class="top">
			<div>
				<h3 >成绩管理程序</h3>
				<div>
					<span>欢迎你：
					
					<sec:authorize access="!hasRole('ROLE_DIY')">
					<sec:authentication property="principal.name" />
					</sec:authorize>
  <a href="logout" style="margin-left: 1em;">注销</a></span>						
				</div>	
				
			</div>
		</div>
		<div class="center">
			<div class="leftMenu">
				<div id="accordion">
					<h3>成绩管理</h3>
					<div>
						<sec:authorize
							access="hasRole('ROLE_ADMIN')||hasRole('ROLE_TEACHER')">
							
							<ul class="mainMenu">
								<li src="grade/bjcjlr"><a>成绩录入</a></li>
								<li src="grade/grcjlr"><a>个人成绩修改</a></li>
								<li src="grade/bjcjcx"><a>班级成绩查询</a></li>
							</ul>
						</sec:authorize>
						<sec:authorize access="hasRole('ROLE_STUDENT')">
							<ul class="mainMenu">
								<li src="grade/grcjcx"><a>个人成绩查询</a></li>
								<li src="file/manage"><a>图片上传</a></li>
							</ul>
						</sec:authorize>
					</div>
						<h3>系统设置</h3>
						<div>
					<sec:authorize access="hasRole('ROLE_ADMIN')">
							<ul class="mainMenu">
								<li src="course/manage"><a>课程管理</a></li>
								<li src="tbClass/manage"><a>班级管理</a></li>
								<li src="student/manage"><a>学生管理</a></li>
							</ul>
					</sec:authorize>
						</div>
				</div>
			</div>
			<div class="workspace" id="work"></div>
		</div>
		<div class="bottom">三峡职院</div>
	</div>
</body>
</html>